<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%-- <%@ page import="java.util.*"%>
<%@ page import="com.easy.auth.domain.Action"%> --%>
<%
	String username = session.getAttribute("userid") != null ? session
			.getAttribute("userid").toString() : "";
	String roleNames = session.getAttribute("roleNames") != null
			? session.getAttribute("roleNames").toString()
			: "";
%>
<div >
<div style="height:30px;width: 20%; float: left;margin-top:5px;margin-left:10px;">
	<b style="font-size: 14px;">FCC匹配数据处理平台</b>
</div>
<!-- 顶部菜单  - begin -->
<%-- <div style="height:30px;width: 600px;float: left;">
	<%
		for(Map<Action, List<Action>> map : menuList){
			for(Action first : map.keySet()){
	%>
	<div style="width:100px;float: left;">
		<a href="javascript:void(0)" id="sysmb" class="easyui-menubutton"
			data-options="menu:'#<%=first.getOid() %>'">
			<%=first.getOname() %>
		</a>
		<div id="<%=first.getOid() %>" >
			<%
				for(Action second : map.get(first)){
			%>
			<div data-options="iconCls:'<%=second.getIcon() %>'" onclick="goToAction('<%=second.getUrl()%>')"><%=second.getOname() %></div>
			<%} %>
		</div>
	</div>
	<%}} %>
</div> --%>
<!-- 顶部菜单  - end -->
<div style="float: right; width: 8%">
	<div>
		<a href="javascript:void(0)" id="sysmb" class="easyui-menubutton"
			data-options="menu:'#sysmm',iconCls:'icon-man'">
			<%=username%><%=roleNames%>
		</a>
		<div id="sysmm" style="width: 150px;">
			<div data-options="iconCls:'icon-undo'" onclick="logout()">注销</div>
			<div class="menu-sep"></div>
			<div data-options="iconCls:'icon-tip'" onclick="openHelpPanel()">说明</div>
			<div class="menu-sep"></div>
			<div data-options="iconCls:'icon-reload'">
				<span>主题切换</span>
				<div>
					<div onclick="changeThemeFun('default')">default</div>
					<div onclick="changeThemeFun('black')">black</div>
					<div onclick="changeThemeFun('bootstrap')">bootstrap</div>
					<div onclick="changeThemeFun('gray')">gray</div>
					<div onclick="changeThemeFun('metro')">metro</div>
				</div>
			</div>
			<div class="menu-sep"></div>
			<div data-options="iconCls:'icon-edit'" onclick="openHelpPanel()">首选项</div>
		</div>
	</div>
</div>
<div id="win">
	<div class="easyui-tabs" data-options="fit:true">
		<div title="关于" data-options="tools:'#p-tools'"
			style="padding: 10px">
			<p style="font-size: 14px">jQuery EasyUI framework helps you
				build your web pages easily.</p>
			<ul>
				<li>easyui is a collection of user-interface plugin based on
					jQuery.</li>
				<li>easyui provides essential functionality for building modem,
					interactive, javascript applications.</li>
				<li>using easyui you don't need to write many javascript code,
					you usually defines user-interface by writing some HTML markup.</li>
				<li>complete framework for HTML5 web page.</li>
				<li>easyui save your time and scales while developing your
					products.</li>
				<li>easyui is very easy but powerful.</li>
			</ul>
		</div>
		<div title="帮助" data-options="iconCls:'icon-help',closable:true"
			style="padding: 10px">This is the help content.</div>
	</div>
	<div id="p-tools">
		<a href="javascript:void(0)" class="icon-mini-add"
			onclick="alert('add')"></a> <a href="javascript:void(0)"
			class="icon-mini-edit" onclick="alert('edit')"></a> <a
			href="javascript:void(0)" class="icon-mini-refresh"
			onclick="alert('refresh')"></a>
	</div>
</div>
</div>
<script type="text/javascript">
	$(function() {
		//说明窗口设置
		$('#win').window({  
			title:'说明',
		    width:'70%',    
		    height:'70%',  
		    closed:true,
		    modal:true   
		});
	});

	//注销
	function logout() {
		$.messager.confirm('系统提示', '您确定要退出本次登录吗?', function(r) {
            if (r) {
            	var url = getRootPath() + '/LoginController/logout.do';
        		window.location.href = url;
            }
        });
	}
	
	//打开说明窗口
	function openHelpPanel(){
		$('#win').window('open');  // open a window  
	}
	
	//打开对应管理模块
	function goToAction(url){
		window.location.href = getRootPath()+ url;
	}
</script>

